package com.qinggeng.project.system.service;

import com.qinggeng.project.api.dto.Draw;
import com.qinggeng.project.api.dto.DrawResult;
import com.qinggeng.project.system.domain.AssistRecord;
import com.qinggeng.project.system.domain.GoodsGift;
import com.qinggeng.project.system.domain.Orders;
import com.qinggeng.project.system.domain.UserWishGift;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface IGiftService {




    /**
     * 检验是否具备 抽奖资格
     * @param ordersId
     */
    Orders checkIsDraw(Long ordersId);

    /**
     * 检验是否具备免单抽奖资格
     * @param ordersId
     */
    Orders checkIsFree(Long ordersId);

    //获取抽奖次数
    Draw getDrawTimes(Orders orders);

    /**
     * 产生中奖号码
     * @param goodsGiftList
     * @param numberRange
     * @return
     */
    Map<Integer,GoodsGift> getLuckyNum(List<GoodsGift> goodsGiftList, String numberRange);

    /**
     * 获取中奖结果
     * @param userWishGift
     * @return
     */
    DrawResult getDrawResult(UserWishGift userWishGift);

    /**
     * 获取订单抽奖中奖结果
     * @param userWishGift
     * @param luckyNum
     * @param drawNum
     * @return
     */
    DrawResult getOrdersDrawResult(UserWishGift userWishGift,Map<Integer,GoodsGift> luckyNum, Integer drawNum);

    /**
     * 获取助力抽奖中奖结果
     * @param record
     * @param luckyNum
     * @param drawNum
     * @return
     */
    DrawResult getAssistDrawResult(AssistRecord record, Map<Integer,GoodsGift> luckyNum, Integer drawNum);

    Boolean getIsActive();

    Boolean checkIsReturn(Date ordersTime);

}
